import Mock from 'mockjs'

const data = Mock.mock({
  'items|10': [{
    id: '@id',
    CaseID: '@sentence(1, 1)',
    Creator: '@sentence(1, 1)',
    Category: '@sentence(1, 1)',
    Athelete: '@sentence(1, 1)',
    Sport: '@sentence(1, 1)',
    TC: '@sentence(1, 1)',
    PIC: '@sentence(1, 1)',
    ReviewSession: '@sentence(1, 1)',
    ShortReport: '@sentence(1, 1)'
  }]
})

const data2 = Mock.mock({
  'items|2': [{
    'field2|1': '@id',
    default: '@sentence(1, 1)',
    name: '@name',
    email: '@email',
    cname: '@cname',
    'number|1-10000000000': 1,
    date: '@date(yyyy-MM-dd)',
    'address': '@province @city @county',
    Weekday: '',
    text: 'text text'
  }]
})

const data3 = Mock.mock({
  'items|3': [{
    field1: '@sentence(1, 1)',
    field2: '@sentence(1, 1)',
    field3: '@sentence(1, 1)',
    field4: '@sentence(1, 1)',
    field5: '@sentence(1, 1)',
    field6: '@sentence(1, 1)',
    field7: '@sentence(1, 1)'
  }]
})

const data4 = Mock.mock({
  'items|3': [{
    field1: '@sentence(1, 1)',
    field2: '@sentence(1, 1)',
    field3: '@sentence(1, 1)',
    field4: '@sentence(1, 1)',
    field5: '@sentence(1, 1)',
    field6: '@sentence(1, 1)',
    field7: '@sentence(1, 1)'
  }]
})

export default [{
  url: '/home/list',
  type: 'get',
  response: config => {
    const items = data2.items
    return {
      code: 20000,
      data: {
        total: items.length,
        items: items
      }
    }
  }
}, {
  url: '/home/interList',
  type: 'get',
  response: config => {
    const items = data2.items
    return {
      code: 20000,
      data: {
        total: items.length,
        items: items
      }
    }
  }
}, {
  url: '/home/honoursList',
  type: 'get',
  response: config => {
    const items = data2.items
    return {
      code: 20000,
      data: {
        total: items.length,
        items: items
      }
    }
  }
}, {
  url: '/home/schedulesList',
  type: 'get',
  response: config => {
    const items = data2.items
    return {
      code: 20000,
      data: {
        total: items.length,
        items: items
      }
    }
  }
}]
